//
//  DiscussModel.m
//  MJRefresh
//
//  Created by Gollum on 16/09/19
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "DiscussModel.h"
#import "DiscussData.h"

@implementation DiscussModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [DiscussData class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{

    //记得super
    [super setValue:value forKey:key];
    NSMutableArray <DiscussData *>*discussData = [NSMutableArray array];
    NSArray *valueArray = value;
    if ([key isEqualToString:@"data"]) {
        for (NSDictionary *dic in valueArray) {
            DiscussData *myData = [DiscussData modelWithDic:dic];
            [discussData addObject:myData];
        }
        _data = discussData;
    }



}
@end
